@charset "UTF-8";
@import "../../../../../node_modules/craftcms-sass/mixins";

#plugins {
  tbody {
    th,
    td {
      padding-top: 20px;
      padding-bottom: 20px;
    }

    .plugin-infos {
      font-weight: normal;
      display: table;

      .icon,
      .details {
        display: table-cell;
      }

      .icon {
        display: block;
        vertical-align: top;
        padding-right: 14px;
        position: relative;

        a {
          display: block;
          line-height: 0;
        }

        svg, img {
          display: block;
          width: 44px;
          height: 44px;
        }

        .license-key-status {
          display: block;
          position: absolute;
          top: 26px;
          @include left(26px);
          width: 20px;
          height: 20px;
          background: no-repeat 0 0 url(invalid-icon.svg) ;
          background-size: 100% 100%;

          &.valid {
            background-image: url(valid-icon.svg);
          }
        }
      }

      .details {
        vertical-align: middle;

        .plugin-id {
          display: flex;
          align-items: baseline;
          margin-bottom: 0;
          font-size: 1em;
          white-space: nowrap;
          flex-wrap: wrap;

          h2 {
            margin-bottom: 0;
          }

          .edition {
            position: relative;
            top: -1px;
            @include margin-left(7px);
            user-select: none;
            border: 1px solid $mediumTextColor;
            border-radius: 3px;
            display: inline-flex;
            height: 16px;
            transition: border-color linear 100ms;

            & > .edition-name,
            & > .edition-trial {
              padding: 0 6px;
              font-size: 11px;
              line-height: 16px;
              font-weight: normal;
            }

            & > .edition-name {
              color: $mediumDarkTextColor;
              letter-spacing: 1.5px;
              padding-right: 5px;
              text-transform: uppercase;
              transition: color linear 100ms;
            }

            & > .edition-trial {
              position: relative;
              background: $mediumTextColor;
              color: $white;
              border-radius: 0 1px 1px 0;
              letter-spacing: 1px;
              text-transform: lowercase;
              transition: background linear 100ms;
            }

            & .edition-name + .edition-trial {
              @include margin-left(4px);
              @include padding-left(4px);

              &:before {
                display: block;
                position: absolute;
                top: 0;
                content: '';
                font-size: 0;
                width: 0;
                height: 0;
                border-style: solid;
                transition: border-color linear 100ms;

                body.ltr & {
                  left: -7px;
                  border-width: 0 7px 16px 0;
                  border-color: transparent $mediumTextColor transparent transparent;
                }

                body.rtl & {
                  right: -7px;
                  border-width: 0 0 16px 7px;
                  border-color: transparent transparent transparent $mediumTextColor;
                }
              }
            }
          }

          a.edition:hover {
            text-decoration: none;
            border-color: $linkColor;

            & > .edition-name {
              color: $linkColor;
            }

            & > .edition-trial {
              background: $linkColor;
            }

            & .edition-name + .edition-trial {
              &:before {
                body.ltr & {
                  left: -7px;
                  border-width: 0 7px 16px 0;
                  border-right-color: $linkColor;
                }

                body.rtl & {
                  border-left-color: $linkColor;
                }
              }
            }
          }

          .version {
            color: $mediumTextColor;
            font-weight: normal;
            @include margin-left(14px);
          }
        }

        p {
          margin: 0.2em 0;

          &.links {
            display: flex;
            white-space: nowrap;
            flex-wrap: wrap;

            a {
              & + a {
                margin-left: 14px;
              }

              span[data-icon] {
                margin-right: 3px;
              }
            }
          }
        }

        .license-key {
          margin-top: 1em;

          .pane {
            margin: 0;
            padding: 3px;
            background: $grey050;
            border-radius: $mediumBorderRadius;

            input.text {
              font-weight: bold;
              font-size: 11px !important;
              padding: 3px 7px 1px;
              width: 19em;
            }
          }

          .btn, .spinner {
            margin: 0;
          }
        }

        .expired {
          margin-top: 1em;
        }
      }
    }

    &:not(.collapsed) {
      .plugin-infos {
        .details {
          min-width: 150px;
        }
      }
    }
  }
}
